package com.dldata.devtools30.repository.zhibiao;



import com.dldata.devtools30.entity.DevtZbclassInfoEntity;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by ai on 2017/1/11.
 */
@Repository
public interface DevtZbclassInfoEntityDao
        extends com.dldata.devtools30.repository.BaseRepository<DevtZbclassInfoEntity,String>, JpaSpecificationExecutor<DevtZbclassInfoEntity> {
    
    @Query("select t from DevtZbclassInfoEntity t ")
    public List<DevtZbclassInfoEntity> getAll();
    
    @Query("select t from DevtZbclassInfoEntity t where t.zbclassname like  ?1 or zbclasscode like ?1 ")
    public List<DevtZbclassInfoEntity> getAll(String serach);
    
    @Query("select t from DevtZbclassInfoEntity t where t.parentid = ?1 ")
    public List<DevtZbclassInfoEntity> getAllByParentid(String parentid);
    
    @Query("select t from DevtZbclassInfoEntity t where t.parentid != '0' ")
    public List<DevtZbclassInfoEntity> getAllErji();
    
}
